home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmigaPlus / Tools / Development / renderlib40 / src / rnd_render.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-12-20  |  1.4 KB  |  57 lines

  1.  
  2. #ifndef _RND_RENDER_H
  3. #define _RND_RENDER_H
  4.  
  5. #include <utility/tagitem.h>
  6. #include <exec/memory.h>
  7. #include <render/renderhooks.h>
  8. #include <graphics/gfx.h>
  9. #include "rnd_scale.h"
  10. #include "rnd_palette.h"
  11.  
  12. LIBAPI ULONG RenderA(ULONG *src, UWORD w, UWORD h, UBYTE *dst, RNDPAL *pal, struct TagItem *tags);
  13. LIBAPI ULONG ConvertChunkyA(UBYTE *src, RNDPAL *srcpal, UWORD width, UWORD height, UBYTE *dst, RNDPAL *dstpal, struct TagItem *tags);
  14.  
  15. struct RenderData
  16. {
  17.     APTR src;                /* source data ptr */
  18.     APTR dst;                /* dest data ptr */
  19.     RNDPAL *srcpal;            /* src palette */
  20.     RNDPAL *dstpal;            /* dst palette */
  21.     UBYTE *pentab;            /* pentable for secodary pen conversion */
  22.     RNDSCALE *scaleengine;    /* optional scaleengine */
  23.     APTR rmh;                /* preferred memory manager */
  24.     LONG width;
  25.     LONG height;
  26.     LONG srcbpp;            /* bytes per pixel, source */
  27.     LONG dstbpp;            /* bytes per pixel, dest */
  28.     LONG tsw, tdw;            /* total source/dest buffer width */
  29.  
  30.     struct Hook *linehook;
  31.     struct Hook *proghook;
  32.     struct RND_ProgressMessage progmsg;
  33.     struct RND_LineMessage fetchmsg;
  34.     struct RND_LineMessage rendermsg;
  35.  
  36.     WORD *ditherbuf;
  37.  
  38.     ULONG (*renderyfunc)(struct RenderData *data);
  39.     void (*renderxfunc)(struct RenderData *data, APTR src, APTR dst, LONG width);
  40.  
  41.     UWORD flipflop;        /* for zig-zag dithering */
  42.     WORD Ar, Ag, Ab, Br, Bg, Bb, Cr, Cg, Cb;
  43.  
  44.     struct ScaleData scdata;
  45.     UBYTE pens[256];
  46.     
  47.     ULONG bgcolor;
  48.     ULONG bgpen;
  49.     
  50.     BYTE *randtab;
  51.     WORD randi;
  52.     UWORD dithermode;
  53.     
  54. };
  55.  
  56. #endif
  57.